 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKCompile/CompileModel.h>

@implementation ComputeTypeDefine
-(id) initWithName:(NSString*) name
      buildResourceMem:(NSNumber*)buildResourceMem
      buildResourceCpu:(NSNumber*)buildResourceCpu { 
     self.name = name;               
     self.buildResourceMem = buildResourceMem;               
     self.buildResourceCpu = buildResourceCpu;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self buildResourceMem])
    {
        [result setValue:[self buildResourceMem] forKey:@"buildResourceMem"];
    }
    if([self buildResourceCpu])
    {
        [result setValue:[self buildResourceCpu] forKey:@"buildResourceCpu"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.buildResourceMem = [dictionary objectForKey:@"buildResourceMem"];
    self.buildResourceCpu = [dictionary objectForKey:@"buildResourceCpu"];
    return self;
}
 @end
@implementation CodeTypeDefine
-(id) initWithLabel:(NSString*) label
      value:(NSString*)value { 
     self.label = label;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self label])
    {
        [result setValue:[self label] forKey:@"label"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.label = [dictionary objectForKey:@"label"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation MailTypeDefine
-(id) initWithLabel:(NSString*) label
      value:(NSString*)value { 
     self.label = label;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self label])
    {
        [result setValue:[self label] forKey:@"label"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.label = [dictionary objectForKey:@"label"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation CompilerTypeDefine
-(id) initWithLabel:(NSString*) label
      value:(NSString*)value { 
     self.label = label;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self label])
    {
        [result setValue:[self label] forKey:@"label"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.label = [dictionary objectForKey:@"label"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation TagDefine
-(id) initWithName:(NSString*) name
      buildImage:(NSString*)buildImage { 
     self.name = name;               
     self.buildImage = buildImage;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self buildImage])
    {
        [result setValue:[self buildImage] forKey:@"buildImage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.buildImage = [dictionary objectForKey:@"buildImage"];
    return self;
}
 @end
@implementation OssDefine
-(id) initWithName:(NSString*) name
      idValue:(NSString*)idValue
      ossHost:(NSString*)ossHost { 
     self.name = name;               
     self.idValue = idValue;               
     self.ossHost = ossHost;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self ossHost])
    {
        [result setValue:[self ossHost] forKey:@"ossHost"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.ossHost = [dictionary objectForKey:@"ossHost"];
    return self;
}
 @end
@implementation TimeoutDefine
-(id) initWithName:(NSString*) name
      timeout:(NSNumber*)timeout { 
     self.name = name;               
     self.timeout = timeout;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self timeout])
    {
        [result setValue:[self timeout] forKey:@"timeout"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.timeout = [dictionary objectForKey:@"timeout"];
    return self;
}
 @end
@implementation SimpleJob
-(id) initWithUuid:(NSString*) uuid
      name:(NSString*)name
      buildStartAt:(NSNumber*)buildStartAt
      compilerType:(NSString*)compilerType
      buildStatus:(NSString*)buildStatus { 
     self.uuid = uuid;               
     self.name = name;               
     self.buildStartAt = buildStartAt;               
     self.compilerType = compilerType;               
     self.buildStatus = buildStatus;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self buildStartAt])
    {
        [result setValue:[self buildStartAt] forKey:@"buildStartAt"];
    }
    if([self compilerType])
    {
        [result setValue:[self compilerType] forKey:@"compilerType"];
    }
    if([self buildStatus])
    {
        [result setValue:[self buildStatus] forKey:@"buildStatus"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.name = [dictionary objectForKey:@"name"];
    self.buildStartAt = [dictionary objectForKey:@"buildStartAt"];
    self.compilerType = [dictionary objectForKey:@"compilerType"];
    self.buildStatus = [dictionary objectForKey:@"buildStatus"];
    return self;
}
 @end
@implementation CompilerTypes
-(id) initWithId:(NSString*) idValue
      compilerType:(NSString*)compilerType { 
     self.idValue = idValue;               
     self.compilerType = compilerType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self compilerType])
    {
        [result setValue:[self compilerType] forKey:@"compilerType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.compilerType = [dictionary objectForKey:@"compilerType"];
    return self;
}
 @end
@implementation JobRequest
-(id) initWithName:(NSString*) name
      codeType:(NSString*)codeType
      codeRepoUrl:(NSString*)codeRepoUrl
      codeRepoBranch:(NSString*)codeRepoBranch
      ossPath:(NSString*)ossPath
      ossHost:(NSString*)ossHost
      ossBucket:(NSString*)ossBucket
      buildImage:(NSString*)buildImage
      isUserBuildSetConfig:(NSNumber*)isUserBuildSetConfig
      buildSetConfig:(NSString*)buildSetConfig
      buildTimeOut:(NSNumber*)buildTimeOut
      buildResourceCpu:(NSNumber*)buildResourceCpu
      buildResourceMem:(NSNumber*)buildResourceMem
      noticeMail:(NSString*)noticeMail
      noticeType:(NSString*)noticeType
      compilerType:(NSString*)compilerType
      dockerRegistry:(NSString*)dockerRegistry
      dockerRepository:(NSString*)dockerRepository
      dockerRegistryUri:(NSString*)dockerRegistryUri { 
     self.name = name;               
     self.codeType = codeType;               
     self.codeRepoUrl = codeRepoUrl;               
     self.codeRepoBranch = codeRepoBranch;               
     self.ossPath = ossPath;               
     self.ossHost = ossHost;               
     self.ossBucket = ossBucket;               
     self.buildImage = buildImage;               
     self.isUserBuildSetConfig = isUserBuildSetConfig;               
     self.buildSetConfig = buildSetConfig;               
     self.buildTimeOut = buildTimeOut;               
     self.buildResourceCpu = buildResourceCpu;               
     self.buildResourceMem = buildResourceMem;               
     self.noticeMail = noticeMail;               
     self.noticeType = noticeType;               
     self.compilerType = compilerType;               
     self.dockerRegistry = dockerRegistry;               
     self.dockerRepository = dockerRepository;               
     self.dockerRegistryUri = dockerRegistryUri;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self codeType])
    {
        [result setValue:[self codeType] forKey:@"codeType"];
    }
    if([self codeRepoUrl])
    {
        [result setValue:[self codeRepoUrl] forKey:@"codeRepoUrl"];
    }
    if([self codeRepoBranch])
    {
        [result setValue:[self codeRepoBranch] forKey:@"codeRepoBranch"];
    }
    if([self ossPath])
    {
        [result setValue:[self ossPath] forKey:@"ossPath"];
    }
    if([self ossHost])
    {
        [result setValue:[self ossHost] forKey:@"ossHost"];
    }
    if([self ossBucket])
    {
        [result setValue:[self ossBucket] forKey:@"ossBucket"];
    }
    if([self buildImage])
    {
        [result setValue:[self buildImage] forKey:@"buildImage"];
    }
    if([self isUserBuildSetConfig])
    {
        [result setValue:[self isUserBuildSetConfig] forKey:@"isUserBuildSetConfig"];
    }
    if([self buildSetConfig])
    {
        [result setValue:[self buildSetConfig] forKey:@"buildSetConfig"];
    }
    if([self buildTimeOut])
    {
        [result setValue:[self buildTimeOut] forKey:@"buildTimeOut"];
    }
    if([self buildResourceCpu])
    {
        [result setValue:[self buildResourceCpu] forKey:@"buildResourceCpu"];
    }
    if([self buildResourceMem])
    {
        [result setValue:[self buildResourceMem] forKey:@"buildResourceMem"];
    }
    if([self noticeMail])
    {
        [result setValue:[self noticeMail] forKey:@"noticeMail"];
    }
    if([self noticeType])
    {
        [result setValue:[self noticeType] forKey:@"noticeType"];
    }
    if([self compilerType])
    {
        [result setValue:[self compilerType] forKey:@"compilerType"];
    }
    if([self dockerRegistry])
    {
        [result setValue:[self dockerRegistry] forKey:@"dockerRegistry"];
    }
    if([self dockerRepository])
    {
        [result setValue:[self dockerRepository] forKey:@"dockerRepository"];
    }
    if([self dockerRegistryUri])
    {
        [result setValue:[self dockerRegistryUri] forKey:@"dockerRegistryUri"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.codeType = [dictionary objectForKey:@"codeType"];
    self.codeRepoUrl = [dictionary objectForKey:@"codeRepoUrl"];
    self.codeRepoBranch = [dictionary objectForKey:@"codeRepoBranch"];
    self.ossPath = [dictionary objectForKey:@"ossPath"];
    self.ossHost = [dictionary objectForKey:@"ossHost"];
    self.ossBucket = [dictionary objectForKey:@"ossBucket"];
    self.buildImage = [dictionary objectForKey:@"buildImage"];
    self.isUserBuildSetConfig = [dictionary objectForKey:@"isUserBuildSetConfig"];
    self.buildSetConfig = [dictionary objectForKey:@"buildSetConfig"];
    self.buildTimeOut = [dictionary objectForKey:@"buildTimeOut"];
    self.buildResourceCpu = [dictionary objectForKey:@"buildResourceCpu"];
    self.buildResourceMem = [dictionary objectForKey:@"buildResourceMem"];
    self.noticeMail = [dictionary objectForKey:@"noticeMail"];
    self.noticeType = [dictionary objectForKey:@"noticeType"];
    self.compilerType = [dictionary objectForKey:@"compilerType"];
    self.dockerRegistry = [dictionary objectForKey:@"dockerRegistry"];
    self.dockerRepository = [dictionary objectForKey:@"dockerRepository"];
    self.dockerRegistryUri = [dictionary objectForKey:@"dockerRegistryUri"];
    return self;
}
 @end
@implementation Job
-(id) initWithUuid:(NSString*) uuid
      createdAt:(NSNumber*)createdAt
      updatedAt:(NSNumber*)updatedAt
      name:(NSString*)name
      codeType:(NSString*)codeType
      codeRepoUrl:(NSString*)codeRepoUrl
      codeRepoUrlLabel:(NSString*)codeRepoUrlLabel
      codeRepoBranch:(NSString*)codeRepoBranch
      createUserName:(NSString*)createUserName
      codeRepoPrivate:(NSNumber*)codeRepoPrivate
      createUserPin:(NSString*)createUserPin
      ossPath:(NSString*)ossPath
      ossHost:(NSString*)ossHost
      ossBucket:(NSString*)ossBucket
      buildImage:(NSString*)buildImage
      buildImageLabel:(NSString*)buildImageLabel
      isUserBuildSetConfig:(NSNumber*)isUserBuildSetConfig
      buildSetConfig:(NSString*)buildSetConfig
      buildTimeOut:(NSNumber*)buildTimeOut
      buildResourceCpu:(NSNumber*)buildResourceCpu
      buildResourceMem:(NSNumber*)buildResourceMem
      noticeMail:(NSString*)noticeMail
      noticeType:(NSString*)noticeType
      compilerType:(NSString*)compilerType
      dockerRegistry:(NSString*)dockerRegistry
      dockerRepository:(NSString*)dockerRepository
      dockerRegistryUri:(NSString*)dockerRegistryUri { 
     self.uuid = uuid;               
     self.createdAt = createdAt;               
     self.updatedAt = updatedAt;               
     self.name = name;               
     self.codeType = codeType;               
     self.codeRepoUrl = codeRepoUrl;               
     self.codeRepoUrlLabel = codeRepoUrlLabel;               
     self.codeRepoBranch = codeRepoBranch;               
     self.createUserName = createUserName;               
     self.codeRepoPrivate = codeRepoPrivate;               
     self.createUserPin = createUserPin;               
     self.ossPath = ossPath;               
     self.ossHost = ossHost;               
     self.ossBucket = ossBucket;               
     self.buildImage = buildImage;               
     self.buildImageLabel = buildImageLabel;               
     self.isUserBuildSetConfig = isUserBuildSetConfig;               
     self.buildSetConfig = buildSetConfig;               
     self.buildTimeOut = buildTimeOut;               
     self.buildResourceCpu = buildResourceCpu;               
     self.buildResourceMem = buildResourceMem;               
     self.noticeMail = noticeMail;               
     self.noticeType = noticeType;               
     self.compilerType = compilerType;               
     self.dockerRegistry = dockerRegistry;               
     self.dockerRepository = dockerRepository;               
     self.dockerRegistryUri = dockerRegistryUri;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self createdAt])
    {
        [result setValue:[self createdAt] forKey:@"createdAt"];
    }
    if([self updatedAt])
    {
        [result setValue:[self updatedAt] forKey:@"updatedAt"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self codeType])
    {
        [result setValue:[self codeType] forKey:@"codeType"];
    }
    if([self codeRepoUrl])
    {
        [result setValue:[self codeRepoUrl] forKey:@"codeRepoUrl"];
    }
    if([self codeRepoUrlLabel])
    {
        [result setValue:[self codeRepoUrlLabel] forKey:@"codeRepoUrlLabel"];
    }
    if([self codeRepoBranch])
    {
        [result setValue:[self codeRepoBranch] forKey:@"codeRepoBranch"];
    }
    if([self createUserName])
    {
        [result setValue:[self createUserName] forKey:@"createUserName"];
    }
    if([self codeRepoPrivate])
    {
        [result setValue:[self codeRepoPrivate] forKey:@"codeRepoPrivate"];
    }
    if([self createUserPin])
    {
        [result setValue:[self createUserPin] forKey:@"createUserPin"];
    }
    if([self ossPath])
    {
        [result setValue:[self ossPath] forKey:@"ossPath"];
    }
    if([self ossHost])
    {
        [result setValue:[self ossHost] forKey:@"ossHost"];
    }
    if([self ossBucket])
    {
        [result setValue:[self ossBucket] forKey:@"ossBucket"];
    }
    if([self buildImage])
    {
        [result setValue:[self buildImage] forKey:@"buildImage"];
    }
    if([self buildImageLabel])
    {
        [result setValue:[self buildImageLabel] forKey:@"buildImageLabel"];
    }
    if([self isUserBuildSetConfig])
    {
        [result setValue:[self isUserBuildSetConfig] forKey:@"isUserBuildSetConfig"];
    }
    if([self buildSetConfig])
    {
        [result setValue:[self buildSetConfig] forKey:@"buildSetConfig"];
    }
    if([self buildTimeOut])
    {
        [result setValue:[self buildTimeOut] forKey:@"buildTimeOut"];
    }
    if([self buildResourceCpu])
    {
        [result setValue:[self buildResourceCpu] forKey:@"buildResourceCpu"];
    }
    if([self buildResourceMem])
    {
        [result setValue:[self buildResourceMem] forKey:@"buildResourceMem"];
    }
    if([self noticeMail])
    {
        [result setValue:[self noticeMail] forKey:@"noticeMail"];
    }
    if([self noticeType])
    {
        [result setValue:[self noticeType] forKey:@"noticeType"];
    }
    if([self compilerType])
    {
        [result setValue:[self compilerType] forKey:@"compilerType"];
    }
    if([self dockerRegistry])
    {
        [result setValue:[self dockerRegistry] forKey:@"dockerRegistry"];
    }
    if([self dockerRepository])
    {
        [result setValue:[self dockerRepository] forKey:@"dockerRepository"];
    }
    if([self dockerRegistryUri])
    {
        [result setValue:[self dockerRegistryUri] forKey:@"dockerRegistryUri"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.createdAt = [dictionary objectForKey:@"createdAt"];
    self.updatedAt = [dictionary objectForKey:@"updatedAt"];
    self.name = [dictionary objectForKey:@"name"];
    self.codeType = [dictionary objectForKey:@"codeType"];
    self.codeRepoUrl = [dictionary objectForKey:@"codeRepoUrl"];
    self.codeRepoUrlLabel = [dictionary objectForKey:@"codeRepoUrlLabel"];
    self.codeRepoBranch = [dictionary objectForKey:@"codeRepoBranch"];
    self.createUserName = [dictionary objectForKey:@"createUserName"];
    self.codeRepoPrivate = [dictionary objectForKey:@"codeRepoPrivate"];
    self.createUserPin = [dictionary objectForKey:@"createUserPin"];
    self.ossPath = [dictionary objectForKey:@"ossPath"];
    self.ossHost = [dictionary objectForKey:@"ossHost"];
    self.ossBucket = [dictionary objectForKey:@"ossBucket"];
    self.buildImage = [dictionary objectForKey:@"buildImage"];
    self.buildImageLabel = [dictionary objectForKey:@"buildImageLabel"];
    self.isUserBuildSetConfig = [dictionary objectForKey:@"isUserBuildSetConfig"];
    self.buildSetConfig = [dictionary objectForKey:@"buildSetConfig"];
    self.buildTimeOut = [dictionary objectForKey:@"buildTimeOut"];
    self.buildResourceCpu = [dictionary objectForKey:@"buildResourceCpu"];
    self.buildResourceMem = [dictionary objectForKey:@"buildResourceMem"];
    self.noticeMail = [dictionary objectForKey:@"noticeMail"];
    self.noticeType = [dictionary objectForKey:@"noticeType"];
    self.compilerType = [dictionary objectForKey:@"compilerType"];
    self.dockerRegistry = [dictionary objectForKey:@"dockerRegistry"];
    self.dockerRepository = [dictionary objectForKey:@"dockerRepository"];
    self.dockerRegistryUri = [dictionary objectForKey:@"dockerRegistryUri"];
    return self;
}
 @end
@implementation CreateHookParams
-(id) initWithUrl:(NSString*) url
      token:(NSString*)token
      ssl:(NSNumber*)ssl
      type:(NSString*)type { 
     self.url = url;               
     self.token = token;               
     self.ssl = ssl;               
     self.type = type;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self url])
    {
        [result setValue:[self url] forKey:@"url"];
    }
    if([self token])
    {
        [result setValue:[self token] forKey:@"token"];
    }
    if([self ssl])
    {
        [result setValue:[self ssl] forKey:@"ssl"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.url = [dictionary objectForKey:@"url"];
    self.token = [dictionary objectForKey:@"token"];
    self.ssl = [dictionary objectForKey:@"ssl"];
    self.type = [dictionary objectForKey:@"type"];
    return self;
}
 @end
@implementation SimpleBuild
-(id) initWithUuid:(NSString*) uuid
      jobName:(NSString*)jobName
      createdAt:(NSNumber*)createdAt
      compilerType:(NSString*)compilerType
      status:(NSString*)status
      duration:(NSNumber*)duration { 
     self.uuid = uuid;               
     self.jobName = jobName;               
     self.createdAt = createdAt;               
     self.compilerType = compilerType;               
     self.status = status;               
     self.duration = duration;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self jobName])
    {
        [result setValue:[self jobName] forKey:@"jobName"];
    }
    if([self createdAt])
    {
        [result setValue:[self createdAt] forKey:@"createdAt"];
    }
    if([self compilerType])
    {
        [result setValue:[self compilerType] forKey:@"compilerType"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self duration])
    {
        [result setValue:[self duration] forKey:@"duration"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.jobName = [dictionary objectForKey:@"jobName"];
    self.createdAt = [dictionary objectForKey:@"createdAt"];
    self.compilerType = [dictionary objectForKey:@"compilerType"];
    self.status = [dictionary objectForKey:@"status"];
    self.duration = [dictionary objectForKey:@"duration"];
    return self;
}
 @end
@implementation RegionTypeDefine
-(id) initWithId:(NSString*) idValue
      name:(NSString*)name { 
     self.idValue = idValue;               
     self.name = name;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.name = [dictionary objectForKey:@"name"];
    return self;
}
 @end
@implementation ImageDefine
-(id) initWithName:(NSString*) name
      tags:(NSArray<TagDefine*>*)tags { 
     self.name = name;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            TagDefine* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            TagDefine* item = [[TagDefine alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation Config
-(id) initWithImage:(NSArray<ImageDefine*>*) image
      codeType:(NSArray<CodeTypeDefine*>*)codeType
      oss:(NSArray<OssDefine*>*)oss
      timeout:(NSArray<TimeoutDefine*>*)timeout
      computeType:(NSArray<ComputeTypeDefine*>*)computeType
      mailType:(NSArray<MailTypeDefine*>*)mailType
      compilerType:(NSArray<CompilerTypeDefine*>*)compilerType { 
     self.image = image;               
     self.codeType = codeType;               
     self.oss = oss;               
     self.timeout = timeout;               
     self.computeType = computeType;               
     self.mailType = mailType;               
     self.compilerType = compilerType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self image])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self image] count]; i++) {
            ImageDefine* item = [[self image] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"image"];
    }
    if([self codeType])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self codeType] count]; i++) {
            CodeTypeDefine* item = [[self codeType] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"codeType"];
    }
    if([self oss])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self oss] count]; i++) {
            OssDefine* item = [[self oss] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"oss"];
    }
    if([self timeout])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self timeout] count]; i++) {
            TimeoutDefine* item = [[self timeout] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"timeout"];
    }
    if([self computeType])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self computeType] count]; i++) {
            ComputeTypeDefine* item = [[self computeType] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"computeType"];
    }
    if([self mailType])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self mailType] count]; i++) {
            MailTypeDefine* item = [[self mailType] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"mailType"];
    }
    if([self compilerType])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self compilerType] count]; i++) {
            CompilerTypeDefine* item = [[self compilerType] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"compilerType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* imageArray = [dictionary objectForKey:@"image"];
    if(imageArray&&![imageArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [imageArray count];i++)
        {
            ImageDefine* item = [[ImageDefine alloc]initWithDic:[imageArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.image = propertyArray;
    }
    NSArray* codeTypeArray = [dictionary objectForKey:@"codeType"];
    if(codeTypeArray&&![codeTypeArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [codeTypeArray count];i++)
        {
            CodeTypeDefine* item = [[CodeTypeDefine alloc]initWithDic:[codeTypeArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.codeType = propertyArray;
    }
    NSArray* ossArray = [dictionary objectForKey:@"oss"];
    if(ossArray&&![ossArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [ossArray count];i++)
        {
            OssDefine* item = [[OssDefine alloc]initWithDic:[ossArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.oss = propertyArray;
    }
    NSArray* timeoutArray = [dictionary objectForKey:@"timeout"];
    if(timeoutArray&&![timeoutArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [timeoutArray count];i++)
        {
            TimeoutDefine* item = [[TimeoutDefine alloc]initWithDic:[timeoutArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.timeout = propertyArray;
    }
    NSArray* computeTypeArray = [dictionary objectForKey:@"computeType"];
    if(computeTypeArray&&![computeTypeArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [computeTypeArray count];i++)
        {
            ComputeTypeDefine* item = [[ComputeTypeDefine alloc]initWithDic:[computeTypeArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.computeType = propertyArray;
    }
    NSArray* mailTypeArray = [dictionary objectForKey:@"mailType"];
    if(mailTypeArray&&![mailTypeArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [mailTypeArray count];i++)
        {
            MailTypeDefine* item = [[MailTypeDefine alloc]initWithDic:[mailTypeArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.mailType = propertyArray;
    }
    NSArray* compilerTypeArray = [dictionary objectForKey:@"compilerType"];
    if(compilerTypeArray&&![compilerTypeArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [compilerTypeArray count];i++)
        {
            CompilerTypeDefine* item = [[CompilerTypeDefine alloc]initWithDic:[compilerTypeArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.compilerType = propertyArray;
    }
    return self;
}
 @end
 
 


